package com.fy.common.listener;
import com.xiaoju.uemc.tinyid.client.utils.TinyId;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
public class TinyIdInitListener {


    @Value(value = "${tinyid.location}")
    private String location;

    @PostConstruct
    public void onApplicationEvent() {
        TinyId.initClient(location);
    }
}